package cn.swenty.backstage.framework.database.mybatis.enums;

public enum SELECT {
	
	LEFT("$left"),RIGHT("$right"),LIKE("$like"),EQ("$eq"),GT("$gt"),LT("$lt"),IN("$in"),NIN("$nin");
	
	private String code;
	
	public String getCode() {
		return code;
	}



	public void setCode(String code) {
		this.code = code;
	}

	private SELECT(String code) {
		this.code = code;
	}
	
	public String replace(String field){
		return field.replace(code+"_", "");
	}
	
	// 获取status
	public static SELECT get(String code) {
		for (SELECT c : SELECT.values()) {
			if (c.getCode().equals(code)) {
				return c;
			}
		}
		return null;
	}
	

}
